#pragma once

namespace Be
{
	class Entity;
}

namespace Be
{
	template<typename T>
	class ComPtr
	{
	private:
		static std::map<Entity*, T*> m_ComponentMap;

	public:
		ComPtr();
		ComPtr(T* p_pData);
		ComPtr(const ComPtr<T>& p_pData);
		~ComPtr();

	public:
		void Initialize(Entity* p_pEntity);

	public:
		ComPtr<T>& operator=(T* p_pData);
		ComPtr<T>& operator=(const ComPtr<T>& p_pData);

		bool operator==(const T* p_pData) const;
		bool operator==(const ComPtr<T>& p_pData) const;

		bool operator!=(const T* p_pData) const;
		bool operator!=(const ComPtr<T>& p_pData) const;

		bool operator<(const ComPtr<T>& p_pData) const;

		T* operator->();

	private:
		T* m_pData;
	};
}

#include "ComPtr.inl"